set the visible of card field 1 to not the visible of card field 1
if the visible of card field 1 is true then
set the name of me to "Hide Pascal Source"
else set the name of me to "Show Pascal Source"
end mouseUp
-- part 4 (field)
-- low flags: 81
-- high flags: 2007
-- rect: left=12 top=26 right=298 bottom=491
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 22
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: Source
-- part contents for background part 16
----- text -----
PICTFILETORES XFCN version 1.6
Kevin Calhoun
PICTFileToRes creates a PICT resource from a PICT file and copies it into the current stack.
You can tell PICTFileToRes what ID number you want the PICT resource to have or you can let it select an unused number for you. If you choose a number that belongs to another PICT resource currently contained in your stack, the new picture will overwrite the old one.
PICTFileToRes allows the user to choose the PICT file to copy from from a standard file dialog box. If the user presses Cancel instead of choosing a file, PICTFileToRes returns
"Cancel".
As with other resource copiers, if you use PICTFileToRes to copy a PICT into the Home stack, you may have to quit and relaunch HyperCard in order to use it.
INVOKING PICTFILETORES
get PICTFileToRes(<pictID>,<"pictName">)
result: resourceID
Both parameters are optional. If you don't pass a value for pictID, PICTFileToRes will find an ID for the PICT resource that's not currently in use. If you don't pass a value for pictName, the PICT resource will be unnamed. If you pass a value for pictID or pictName that's already in use by another PICT resource in the current stack, the old PICT will be overwritten.
If an error occurs, PICTFileToRes will return an error message. Word 1 of this message will be "Error."
EXAMPLES
put PICTFileToRes(0,"The Little Engine That Could") into pictNumber
get PICTFileToRes
REVISION HISTORY
1.0 -- 4/22/88
1.5 -- 3/15/89 -- Altered source for compatibility with MPW Pascal 3.0.
1.6 -- 7/22/89 No longer leaves a NIL master pointer behind when replacing a resource.
-- part contents for card part 4
----- text -----
UNIT PICTFileToResUnit;
{ PICTFileToRes XFCN © 1988-1989 by the Trustees of Dartmouth College }